#pragma once
#ifndef FACE_H_
#define FACE_H_

#include <d3d9.h>
#include <d3dx9.h>
#include "customVertex.h"
#include "BufferCollection.h"
#include "Textures.h"

namespace Minicraft
{
	class Face
	{
	private:
		// A pointer to the face this face is directly adjacent to.
		Face* neighbor;

		// The texture this cube uses to render.
		Textures::TextureList::e texture;

		// a matrix whose transformation represents the relative offset of this face in relationship to it's cube
		D3DXMATRIX transformationMatrix;

		// whether this face should render
		bool visible;

	public:
		// Constructors
		Face(D3DXMATRIX);

		// Deconstructor
		~Face();

		// Visible Accessor/Mutator
		bool GetVisible();
		void SetVisible(bool);

		// sets the texture of this face
		void SetTexture(Minicraft::Textures::TextureList::e);

		// Sets the visibility of this face and it's neighbors face to be appropriate.
		void SetVisibilityBasedOnNeighbor();

		// Renders the face
		void Draw();
	};
}
#endif